<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 
        空间尺寸 = width + border + padding + margin 
        实际大小 = width + border + padding
         */
        div{
            width: 100px;
            height: 100px;
            background-color: seagreen;
            border: 5px solid red;
            padding: 10px;
            margin: 20px;
        }
    </style>
</head>
<body>
    <div></div>
</body>
</html>